# -*- coding: utf-8 -*-
# @Time        : 2023/9/11 17:46
# @Author      : bai.<byscut2010@foxmail.com>
# @File        : simple_send_msg.py
# @Description :
import time


def send_feishu_msg(token: str, secret: str, title: str, content: str):
    """
    :param token: 飞书token
    :param secret: 飞书secret
    :param title: 消息标题
    :param content: 消息内容
    """
    params = {'token': token, 'secret': secret, 'title': title,
              'content': f"【{time.strftime('%Y-%m-%d %H:%M:%S')}】" + content}
    # fill params
    print(f'send feishu msg. params:{params}')
    from utils.log import error_send
    # send
    error_send.notify_feishu_msg(params)
